package com.oceanread.cn.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.oceanread.cn.entity.Pipeline;
import com.oceanread.cn.entity.Profile;
import com.oceanread.cn.mapper.ProfileMapper;
import com.oceanread.cn.service.IProfileService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IProfileServiceImpl extends ServiceImpl<ProfileMapper, Profile> implements IProfileService {
    public List<Profile> getall() {
        return baseMapper.getall();
    }

    @Override
    public Integer getnum() {
        return baseMapper.getnum();
    }

    public Integer getnumquery(String key, String value) {
        return baseMapper.getnumquery(key, value);
    }

    @Override
    public List<Profile> findall(int page, int size) {
        return baseMapper.findall((page - 1) * size, size);
    }

    @Override
    public List<Profile> query(int page, int size, String key, String value) {
        return baseMapper.query((page - 1) * size, size, key, value);
    }
    @Override
    public List<Profile> queryNopage(String key, String value) {
        return baseMapper.queryNopage( key, value);
    }
    @Override
    public List<Profile> queryNopage2( String key, String value,String key2, String value2) {
        return baseMapper.queryNopage2( key, value,key2, value2);
    }

    @Override
    public int insert(String PrjCode, String Code, String Name, String IDLine, String Order, String Lat, String Lon) {
        return baseMapper.insert(PrjCode, Code, Name, IDLine, Order, Lat, Lon);
    }

    @Override
    public Integer update(Profile profile) {
        return baseMapper.update(profile.getSYSID(), profile.getPrjCode(), profile.getCode(), profile.getName(),
                profile.getIDline(), profile.getOrder(), profile.getLat(), profile.getLon());
    }

    public Integer delete(int SYSID) {
        return baseMapper.delete(SYSID);
    }

    @Override
    public List<Profile> getLine(String PrjCode) {
        return baseMapper.getLine(PrjCode);
    }

    @Override
    public List<Profile> getPoint(String PrjCode, String IDLine) {
        return baseMapper.getPoint(PrjCode, IDLine);
    }

    @Override
    public List<Profile> getLine_Page(String PrjCode, int page, int size) {
        return baseMapper.getLine_Page(PrjCode, (page - 1) * size, size);
    }

    public Integer getLine_Num(String PrjCode) {
        return baseMapper.getLine_Num(PrjCode);
    }

    @Override
    public List<Profile> getPoint_Page(String PrjCode, String IDLine, int page, int size) {
        return baseMapper.getPoint_Page(PrjCode, IDLine, (page - 1) * size, size);
    }

    public Integer getPoint_Num(String PrjCode, String IDLine) {
        return baseMapper.getPoint_Num(PrjCode, IDLine);
    }


}
